<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <h1>F12查看效果</h1>

<h1>距今多久</h1>
<div id="demo1"></div>

<script src="./utils.js"></script>

<script>
    var result = ''
    result += " dateFormat('2015-4-5 12:00:00')//" + dateFormat('2015-4-5 12:00:00')+ '</br>'
    result += " dateFormat('2015-4-5 12:00:00')//" + dateFormat('2021-12-5 12:00:00')+ '</br>'
    document.querySelector('#demo1').innerHTML = result


</script>
<h1>字符串补零</h1>
<div id="demo2"></div>



<script>
    var result = ''
    result += " zeroize(1)//" + zeroize(1)+ '</br>'
    result += " zeroize(0)//" + zeroize(0)+ '</br>'

    document.querySelector('#demo1').innerHTML = result


</script>

<h1>获取当前时间</h1>
<div id="demo3"></div>



<script>
    var result = ''
    result += " format('y-m-r h:i:s')//" + format('y-m-r h:i:s')+ '</br>'
    result += " format('ymr h:i:s')//" + format('ymr h:i:s')+ '</br>'
    result += " format('ymr ')//" + format('ymr ')+ '</br>'
    document.querySelector('#demo3').innerHTML = result


</script>


<h1>随机获取颜色</h1>
<div id="demo4"></div>



<script>
    var result = ''
    result += " randomColor()//" + randomColor()+ '</br>'
    result += " randomColor()//" + randomColor()+ '</br>'
    result += " randomColor()//" + randomColor()+ '</br>'
    document.querySelector('#demo4').innerHTML = result


</script>


<h1>判断浏览器内核</h1>
<div id="demo5"></div>



<script>
    var result = ''
    result += " myBrowser()//" + myBrowser()+ '</br>'

    document.querySelector('#demo5').innerHTML = result


</script>


<h1>判断微信浏览器</h1>
<div id="demo6"></div>



<script>
    var result = ''
    result += " weChat()//" + weChat()+ '</br>'

    document.querySelector('#demo6').innerHTML = result


</script>


<h1>判断是否移动端</h1>
<div id="demo7"></div>



<script>
    var result = ''
    result += " os()//" + os()+ '</br>'

    document.querySelector('#demo7').innerHTML = result


</script>


<h1>返回标签样式</h1>
<div id="demo8"></div>



<script>
    var result = ''
    var tagObj = document.querySelector('#demo8')
    result += " getStyle(tagObj,'color')//" + getStyle(tagObj,'color')+ '</br>'
    result += " getStyle(tagObj,'fontSize')//" + getStyle(tagObj,'fontSize')+ '</br>'
    result += " getStyle(tagObj,'background')//" + getStyle(tagObj,'background')+ '</br>'

    document.querySelector('#demo8').innerHTML = result


</script>

</body>
</html>